/PROG  PNS0041
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "2HF-1311/1312";
PROG_SIZE	= 3906;
CREATE		= DATE 25-01-24  TIME 12:54:28;
MODIFIED	= DATE 25-02-22  TIME 02:12:10;
FILE_NAME	= PNS0027;
VERSION		= 0;
LINE_COUNT	= 134;
MEMORY_SIZE	= 4482;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0047 ;
   7:  !  PART:53160691/93 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:  DO[43]=PULSE,1.0sec ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:   ;
  51:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  52:   ;
  53:  DO[1]=OFF ;
  54:J P[4:PICK_L] 80% CNT0 TB R[18]sec,CALL PARTPICK_L ACC100 BREAK    ;
  55:  PAYLOAD[2] ;
  56:  CALL CHK_PICK_L    ;
  57:   ;
  58:J P[15] 100% CNT50    ;
  59:   ;
  60:J P[6:PICK APPROACH] 100% CNT100 ACC100    ;
  61:  DO[1]=OFF ;
  62:J P[14:PICK_R] 80% CNT0 TB R[18]sec,CALL PARTPICK_R ACC100 BREAK    ;
  63:J P[16] 100% CNT80    ;
  64:  PAYLOAD[2] ;
  65:  CALL CHK_PICK    ;
  66:   ;
  67:J P[5:PICK DEPART] 100% CNT100 ACC100    ;
  68:  //DO[44]=PULSE,1.0sec ;
  69:  CALL CHECK_PICK    ;
  70:  DO[1]=ON ;
  71:  DO[8]=PULSE,1.0sec ;
  72:  MONITOR Z_CHECH ;
  73:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  74:   ;
  75:  LBL[30:GOTO DROP POUNCE] ;
  76:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  77:  OVERRIDE=R[5] ;
  78:   ;
  79:  LBL[40:AT DROP POUNCE] ;
  80:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  81:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  82:  IF DI[18]=ON,JMP LBL[60] ;
  83:  JMP LBL[40] ;
  84:   ;
  85:  LBL[50:MOVE DROP SNEAK] ;
  86:  OVERRIDE=R[5] ;
  87:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  88:  LBL[51:DROP OR C-P-S] ;
  89:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  90:  IF DI[18]=ON,JMP LBL[40] ;
  91:  JMP LBL[51] ;
  92:  JMP LBL[50] ;
  93:   ;
  94:  LBL[60:MOVE CLS-PRS-ACC] ;
  95:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  96:  PAUSE ;
  97:  JMP LBL[30] ;
  98:   ;
  99:  LBL[80:DROP ENABLED] ;
 100:  !PROCEED TO DROP ;
 101:  TIMER[4]=RESET ;
 102:  TIMER[4]=START ;
 103:   ;
 104:  DO[4]=OFF ;
 105:  OVERRIDE=R[5] ;
 106:J P[10:DROP APPROACH] 80% CNT10 ACC100    ;
 107:  MONITOR END Z_CHECH ;
 108:J P[11:DROP] 50% CNT5 TB R[19]sec,CALL PARTDROP_L ACC110 BREAK    ;
 109:J P[20] 100% CNT100    ;
 110:J P[22:DROP] 80% CNT10    ;
 111:  //DO[1]=OFF ;
 112:J P[21:DROP] 50% CNT5 TB R[18]sec,CALL PARTDROP_R ACC100 BREAK    ;
 113:J P[23] 100% CNT100    ;
 114:  PAYLOAD[1] ;
 115:  CALL CHK_DROP    ;
 116:  OVERRIDE=R[5] ;
 117:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 118:  TIMER[4]=STOP ;
 119:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 120:  DO[6]=PULSE,1.0sec ;
 121:   ;
 122:  !GOTO PICK POUNCE ;
 123:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 124:  //DO[43]=PULSE,1.0sec ;
 125:  IF DI[29]=ON,JMP LBL[90] ;
 126:  JMP LBL[10] ;
 127:   ;
 128:  LBL[90:END OF CYCLE] ;
 129:  TIMER[1]=STOP ;
 130:  R[4]=TIMER[1]    ;
 131:J P[1:MIDDLE] 50% CNT100    ;
 132:  MOVE TO HOME    ;
 133:   ;
 134:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2613.039  mm,	Y =    16.985  mm,	Z =  -680.000  mm,
	W =  -179.895 deg,	P =     -.122 deg,	R =   -90.003 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2753.313  mm,	Y =   153.241  mm,	Z =  -785.200  mm,
	W =  -179.382 deg,	P =      .004 deg,	R =   -90.015 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2778.138  mm,	Y =   584.376  mm,	Z = -1028.449  mm,
	W =  -179.952 deg,	P =      .040 deg,	R =   -90.006 deg
};
P[4:"PICK_L"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2778.164  mm,	Y =   584.387  mm,	Z = -1110.256  mm,
	W =  -179.951 deg,	P =      .040 deg,	R =   -90.006 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2494.929  mm,	Y =   -99.310  mm,	Z =  -873.029  mm,
	W =  -179.402 deg,	P =      .006 deg,	R =   -90.011 deg
};
P[6:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2544.976  mm,	Y =   584.174  mm,	Z = -1028.603  mm,
	W =  -179.956 deg,	P =      .040 deg,	R =   -90.010 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2186.918  mm,	Y =  -428.855  mm,	Z =  -798.477  mm,
	W =  -179.811 deg,	P =      .254 deg,	R =   -89.406 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2186.831  mm,	Y =  -799.271  mm,	Z =  -798.517  mm,
	W =  -179.813 deg,	P =      .254 deg,	R =   -89.410 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2187.592  mm,	Y = -1490.334  mm,	Z =  -858.119  mm,
	W =   179.521 deg,	P =      .777 deg,	R =   -89.025 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2201.474  mm,	Y = -3312.368  mm,	Z = -1032.342  mm,
	W =   179.842 deg,	P =      .379 deg,	R =   -91.526 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2201.376  mm,	Y = -3312.271  mm,	Z = -1115.774  mm,
	W =   179.837 deg,	P =      .384 deg,	R =   -91.528 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3138.782  mm,	Y = -2253.783  mm,	Z =  -927.396  mm,
	W =   179.813 deg,	P =      .405 deg,	R =   -88.146 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2745.992  mm,	Y = -1485.654  mm,	Z =  -751.939  mm,
	W =   179.534 deg,	P =     1.153 deg,	R =   -89.332 deg
};
P[14:"PICK_R"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2544.914  mm,	Y =   584.123  mm,	Z = -1110.341  mm,
	W =  -179.957 deg,	P =      .039 deg,	R =   -90.010 deg
};
P[15]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2778.137  mm,	Y =   584.378  mm,	Z = -1028.449  mm,
	W =  -179.952 deg,	P =      .040 deg,	R =   -90.006 deg
};
P[16]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2544.892  mm,	Y =   584.095  mm,	Z = -1014.884  mm,
	W =  -179.958 deg,	P =      .039 deg,	R =   -90.010 deg
};
P[20]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2201.474  mm,	Y = -3312.368  mm,	Z = -1032.342  mm,
	W =   179.842 deg,	P =      .379 deg,	R =   -91.526 deg
};
P[21:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3141.329  mm,	Y = -2253.893  mm,	Z = -1169.470  mm,
	W =   179.813 deg,	P =      .404 deg,	R =   -88.660 deg
};
P[22:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3141.277  mm,	Y = -2253.870  mm,	Z = -1099.871  mm,
	W =   179.811 deg,	P =      .406 deg,	R =   -88.661 deg
};
P[23]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3141.198  mm,	Y = -2253.850  mm,	Z = -1126.064  mm,
	W =   179.807 deg,	P =      .408 deg,	R =   -88.661 deg
};
/END
